package com.haiyou.dc.guava;

import com.google.common.primitives.Longs;

import java.util.Arrays;

public class LongsDemo {

    public static void main(String[] args) {
        Long xxxx = Longs.tryParse("xxxx");
        System.out.println(xxxx);
        if (xxxx == null) {
            System.out.println("is null");
        }

//        Long xxx = Long.valueOf("xxx");
//        System.out.println(xxx);

        String join = Longs.join("-", 3, 4, 4, 6, 7, 8);
        System.out.println(join);

        long max = Longs.max(33, 68);
        System.out.println(max);
        long min = Longs.min(44, 67);
        System.out.println(min);

        long[] long1 = {33L, 55L};
        long[] long2 = {33L, 55L};
        long[] concat = Longs.concat(new long[]{33, 44}, new long[]{55, 66});
        System.out.println(Arrays.toString(concat));

        long[] longArray = {1,2,3,4,5,6,7,8,9};
        long max1 = Longs.max(longArray);
        System.out.println(max1);

    }
}
